<?php 
/**
 * ModulesModel
 * @author   songhuan <iphper@yeah.net>
 * @version   $Id: CategoriesModel.php 1 2011-06-19 00:00:00Z $
 */
class ModulesModel extends CMysqlTable
{
	public static function model($className = __CLASS__)
	{
		return parent::model($className);
	}
	
	public $rules = array(
		'module_name' => array(
			'required' => true,	
			'when' => self::BOTH
		),
		'module_tblname' => array(
			'required' => true,
			'unique' => true,
			'when' => self::INSERT
		)
	);
	
	public $messages = array(
		'module_name' => array(
			'required' => '请填写模型名'
		),
		'module_tblname' => array(
			'required' => '请填写表前缀',
			'unique' => '此表前缀已被使用，请更换表前缀'
		)
	);
}
